Skip to content

Git snapshot + coordinator - #244

Open
davidabram wants to merge 8 commits into
compare-and-swapfrom
git-snapshot-lock-coordinator
Open

Git snapshot + coordinator#244
davidabram wants to merge 8 commits into
compare-and-swapfrom
git-snapshot-lock-coordinator

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sce-config-json Ready Ready Preview Aug 30, 2026 8:00am

Request Review

@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 74c5a01 to 003ffab Compare August 29, 2026 16:20
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 003ffab to 5046f8c Compare August 29, 2026 17:48
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 5046f8c to c7faf8c Compare August 29, 2026 19:14
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 08c040c to 9e19d0d Compare August 29, 2026 19:40
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 9e19d0d to 1f42a69 Compare August 29, 2026 20:03
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 1f42a69 to 6c777a0 Compare August 30, 2026 04:17
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from b317de7 to 88df593 Compare August 30, 2026 04:48
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 88df593 to de37de8 Compare August 30, 2026 04:59
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from ddf778e to 2c25388 Compare August 30, 2026 05:45
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from d21635d to 4175b12 Compare August 30, 2026 06:27
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 0a01dc0 to 24f9d2e Compare August 30, 2026 07:08
@davidabram
davidabram force-pushed the git-snapshot-lock-coordinator branch from 94d74fd to 8c64a1f Compare August 30, 2026 07:31
davidabram and others added 8 commits August 30, 2026 09:59
Define the staged implementation and integration work for per-worktree locking, isolated Git snapshots, protocol coordination, recovery, and runtime tests. Capture acceptance criteria, task dependencies, design decisions, failure handling, validation, and follow-up context synchronization for the standalone runtime layer.

Plan: mutation-cursor-runtime-coordinator

Co-authored-by: SCE <sce@crocoder.dev>
Prevent concurrent callers from creating divergent checkout IDs or exposing a partially written canonical ID. Use a dedicated slow-path advisory lock with a second read, then persist through a synced unique temporary file and atomic rename; add coverage for convergence and interruption cases. Document the locking behavior and the repository's safe filesystem-test pattern.

Plan: mutation-cursor-runtime-coordinator (T01)

Co-authored-by: SCE <sce@crocoder.dev>
Serialize the mutation-cursor runtime's future worktree critical section without allowing a stuck holder to block later invocations indefinitely. Add private runtime scaffolding and a WorktreeLock that polls File::try_lock() against a caller-supplied timeout, reports a matchable timeout error, and releases ownership through RAII. The lock behavior is covered for contention, timeout, independent worktrees, and stale lock files.

Plan: mutation-cursor-runtime-coordinator (T02)

Co-authored-by: SCE <sce@crocoder.dev>
Capture complete worktree state through a temporary index without altering the real index or working tree. Store snapshot objects in Git's normal object database, pin durable trees with SCE-owned refs, and expose tree diffs for the future coordinator; add focused coverage for state capture, pruning, unborn HEADs, and SHA-256 repositories.

Update mutation-trace architecture documentation and record the completed implementation and verification details.
Plan: mutation-cursor-runtime-coordinator (T03)

Co-authored-by: SCE <sce@crocoder.dev>
The mutation-cursor runtime needs an imperative integration layer that turns Git observations and boundary events into durable protocol state without duplicating evidence or losing concurrent updates.

Add the generic coordinator pipeline with snapshot capture and pinning, idempotent worktree and scope materialization, recovery handling, bounded CAS reload/recompute retries, snapshot-failure taint persistence, and focused concurrency and lifecycle tests. Synchronize the mutation-trace context documents and mark the completed plan task.

The public lock-wrapped coordinate() entrypoint remains follow-up work; this change keeps the internal pipeline deterministic through the SnapshotCapture seam.

Plan: mutation-cursor-runtime-coordinator (T04)

Co-authored-by: SCE <sce@crocoder.dev>
Expose coordinate() as the runtime boundary for driving mutation-cursor processing against a real worktree while preventing concurrent same-worktree observations from racing.

Resolve the Git directory, acquire a bounded WorktreeLock, derive WorktreeId from checkout identity, and delegate to the existing snapshot/protocol/CAS pipeline; add serialization coverage and update the runtime documentation and plan.

Plan: mutation-cursor-runtime-coordinator (T05)

Co-authored-by: SCE <sce@crocoder.dev>
Add end-to-end coverage for linked-worktree coordination, checkout identity convergence, and snapshot failure recovery through coordinate(). Record completion of mutation-cursor-runtime-coordinator T06 and the resulting runtime behavior.

Co-authored-by: SCE <sce@crocoder.dev>
Mark the mutation-cursor runtime coordinator plan complete after the coordinator, snapshot, locking, CAS-retry, taint-recovery, and checkout-ID behaviors passed the recorded validation suite. Preserve the validation evidence and document the intentionally deferred ref reconciliation and external-taint work.

Plan: mutation-cursor-runtime-coordinator
Tasks: AC1-AC13

Co-authored-by: SCE <sce@crocoder.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant